# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-fuzzylogic
_pkgorig=fuzzylogic
pkgver=1.4.1
pkgrel=0
pkgdesc="Fuzzy Logic and Fuzzy Inference implementations"
url="https://github.com/amogorkon/fuzzylogic/"
arch="all !s390x !armv7" # assertionErrors
license="MIT"
depends="python3 py3-matplotlib py3-numpy py3-pandas"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-hypothesis py3-pytest-xdist"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/f/fuzzylogic/fuzzylogic-$pkgver.tar.gz"
builddir="$srcdir/$_pkgorig-$pkgver"
options="!check" # tests not updated

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest -n auto -k 'not test_eq and not test_units'
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
1537e3b2c40c15cfdbb2774232b181eecad2f9c69d815f7bf00c12e6aa4e7e542215b011bdcb0924a92ec2d6064dbf2395183980512efd6763f7343c5aceefb1  py3-fuzzylogic-1.4.1.tar.gz
"
